package com.smartao.base.entityitem;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
import org.hibernate.annotations.ForeignKey;

import com.smartao.base.module.Module;
import com.smartao.core.orm.entity.BaseEntity;

/**
 * 实体关联对象
 * @author Ricky
 */
@Entity
@Table(name = "T_BASE_ENTITYITEM")
public class Entityitem extends BaseEntity<Entityitem> {

	private static final long serialVersionUID = -5477393838088147400L;
	
	private String name;
	
	private String entityKey;
	
	/**
	 * 点击实体选择器后打开的目标地址
	 */
	private String target;
	
	/**
	 * 实体对象引用时的链接地址
	 */
	private String href;
	
	/**
	 * 参数
	 */
	private String filters;
	
	@ManyToOne
	@ForeignKey(name = "none")
	@JoinColumn(name = "module")
	@Fetch(FetchMode.JOIN)
	private Module module;
	
	private String description;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEntityKey() {
		return entityKey;
	}

	public void setEntityKey(String entityKey) {
		this.entityKey = entityKey;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

	public String getHref() {
		return href;
	}

	public void setHref(String href) {
		this.href = href;
	}

	public String getFilters() {
		return filters;
	}

	public void setFilters(String filters) {
		this.filters = filters;
	}

	public Module getModule() {
		return module;
	}

	public void setModule(Module module) {
		this.module = module;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
